//
//  main.cpp
//  opencv_project
//
//  Created by 黄琛 on 2018/12/25.
//  Copyright © 2018 黄琛. All rights reserved.
//

#include "opencv2/opencv.hpp"

using namespace cv;

int main(void)
{
    Mat image = imread("Lena.jpg");
    Mat rs_img, image1, image2, image3;
    
    //缩小一下图片
    pyrDown(image, rs_img);
    
    //平均滤波
    blur(rs_img, image1, Size(7,7));
    
    //高斯滤波
    GaussianBlur(rs_img, image2, Size(7,7), 0);
    
    //中值滤波
    medianBlur(rs_img, image3, 7); //第三个参数表示孔径的线性尺寸，它的值必须是大于1的奇数
    
    imshow("Source", rs_img);
    imshow("blur",image1);
    imshow("GaussianBlur", image2);
    imshow("medianBlur", image3);
    
    waitKey(0);
    
    return 0;
    
}
